package com.hqq.service.impl;

import com.hqq.dao.WoocTypeDao;
import com.hqq.domain.WoocType;
import com.hqq.service.WoocTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * WoocTypeServiceImpl
 * Created by heqianqian on 2018/3/25.
 */
@Service
public class WoocTypeServiceImpl implements WoocTypeService {

    @Autowired
    private WoocTypeDao woocTypeDao;

    @Override
    public List<WoocType> listFirstType() {
        return woocTypeDao.listByParentId(0L);
    }

    @Override
    public List<WoocType> listSecondType(Long firstMenuId) {
        return woocTypeDao.listByParentId(firstMenuId);
    }
}
